cmake_minimum_required(VERSION 3.29)
project(asio_server)

set(CMAKE_CXX_STANDARD 20)
include_directories(./include)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)

add_executable(asio_server main.cpp
        src/Server.cpp
        include/Server.h
        include/Singleton.h
        src/Session.cpp
        include/Session.h
        src/MsgNode.cpp
        include/MsgNode.h
        src/LogicSystem.cpp
        include/LogicSystem.h
        include/Const.h
        include/IOServicePool.h
        src/IOServicePool.cpp
)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    include_directories(D:\\Depend\\boost_1_86_0)
    include_directories(D:\\Depend\\cpp-lib\\json-cpp\\include)
    target_link_libraries(asio_server ws2_32 mswsock)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()

